using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GameOver : BasePanel
{
    [SerializeField] private Button reviveButton;
    [SerializeField] private Button exitButton;
    
    
    
    //
    private void Start()
    {
        reviveButton.onClick.AddListener(ReviveAction);
        exitButton.onClick.AddListener(ExitAction);
    }
    
    //
    private void ReviveAction()
    {
        // 玩家复活
        EventCenter.Instance.EventTrigger(EventName.EVENT_GAME_RESTART, true);
    }
    
    //
    private void ExitAction()
    {
        // 玩家退出游戏，回到主界面
        EventCenter.Instance.EventTrigger(EventName.EVENT_SCENE_SCENESWITE, 0);
    }
}
